package com.bhs.sansonglogistics.ui.order;

import static android.content.Context.CLIPBOARD_SERVICE;

import android.annotation.SuppressLint;
import android.app.Activity;

import android.content.ClipData;
import android.content.ClipboardManager;
import android.content.Intent;
import android.text.TextUtils;
import android.view.View;
import android.view.animation.RotateAnimation;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;

import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;


import com.bhs.sansonglogistics.R;
import com.bhs.sansonglogistics.bean.FeeDetail;
import com.bhs.sansonglogistics.bean.Location;
import com.bhs.sansonglogistics.bean.OrderGoodsBean;
import com.bhs.sansonglogistics.bean.PictureShowBean;
import com.bhs.sansonglogistics.bean.SourceGoodsDetailsBean;
import com.bhs.sansonglogistics.dialog.BottomSelectPhoneDialog;
import com.bhs.sansonglogistics.net.Config;
import com.bhs.sansonglogistics.ui.adapter.HavePaidAdapter;
import com.bhs.sansonglogistics.ui.adapter.PictureShowAdapter;
import com.bhs.sansonglogistics.ui.adapter.UnpaidAdapter;
import com.bhs.sansonglogistics.ui.other.WebViewActivity;
import com.bhs.sansonglogistics.utils.DateUtils;
import com.bhs.sansonglogistics.utils.GetDistanceUtils;
import com.bhs.sansonglogistics.utils.MyUtils;
import com.bhs.sansonglogistics.utils.ToastUtil;
import com.bhs.sansonglogistics.view.ExpandView;
import com.bhs.sansonglogistics.view.SlideLockView;
import com.bumptech.glide.Glide;
import com.bumptech.glide.request.RequestOptions;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.lxj.xpopup.XPopup;
import com.lxj.xpopup.core.BasePopupView;
import com.lxj.xpopup.util.SmartGlideImageLoader;

import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.List;

/**
 * 订单详情
 */
public class OrderDetailsReuse implements View.OnClickListener {

    private Activity mActivity;
    private RotateAnimation animation;
    private RotateAnimation animation2;
    public ClipData mClipData;   //剪切板Data对象
    public ClipboardManager mClipboardManager;   //剪切板管理工具类

    public OrderDetailsReuse(Activity mActivity) {
        this.mActivity = mActivity;
        initView();
    }

    private LinearLayout mLlCostInformation;
    private TextView mTvUnpaid;
    private TextView mTvPaidExpenses2;
    private LinearLayout mLlPersonnelInformation;
    private ImageView mIvHeadPortrait;
    private TextView mTvTailNumber;
    private TextView mTvPhoneNumber;
    private ImageView mIvLocation;
    public ImageView mIvSendMessage;
    public ImageView mIvCall;
    private LinearLayout mOrderInformation;
    private TextView mTvTime;
    private TextView mTvDistance;
    private ConstraintLayout mClLocation;
    private TextView mTvPlaceDeparture;
    private View mView;
    private TextView mTvDestination;
    private TextView mTvDepartureAddress;
    private TextView mTvDeliveryAddress;
    private TextView mTvDepartureCompany;
    private TextView mTvDeliveryCompany;
    private TextView mTvDepartureInfo;
    private TextView mTvDeliveryInfo;
    private TextView mTvOrderNumber;
    private TextView mTvCopy;
    private TextView mTvOrderTime;
    private TextView mTvAppointmentTime;
    private TextView mTvOrderType;
    private TextView mTvIsInvoice;
    private TextView mTvLogisticsType;
    private TextView mTvRecoveryStrip;
    private TextView mTvRemake;
    private LinearLayout mLlOrderInfo;
    private LinearLayout mCargoInformation;
    private RecyclerView mRvPicture;
    private TextView mTvQuantity;
    private TextView mTvWeight;
    private TextView mTvVolume;
    private TextView mTvDescriptionGoods;
    private TextView mTvPackagingType;
    private TextView mTvDeliveryType;
    private TextView mTvDistributionType;
    private TextView mTvPickUpCargoByOneself;
    private TextView mTvIsomerism;
    private TextView mTvDeclaredValue;
    private LinearLayout mLlGoodsInfo;
    private TextView mTvCostBreakdown;
    private TextView mTvPaidExpenses;

    private TextView mTvOnlineCustomerService;
    private TextView mTvAgreement;
    private SlideLockView mSlideRail;
    private LinearLayout mLockBtn;
    private ExpandView expandView, evCargoInformation;
    private TextView tvStatus, tvStatus2;
    private ImageView ivStatus, ivStatus2;
    private LinearLayout llAppointment;
    private PictureShowAdapter pictureShowAdapter;
    private RelativeLayout llSite;

    private TextView mTvHeteroideusVolume;
    private RecyclerView mRvUnpaid;
    private RecyclerView mRvHavePaid,mRvHavePaid2;


    public void initView() {
        // 1. 注册mClipboardManager
        mTvHeteroideusVolume = mActivity.findViewById(R.id.tv_heteroideus_volume);
        mClipboardManager = (ClipboardManager) mActivity.getSystemService(CLIPBOARD_SERVICE);
        llSite = mActivity.findViewById(R.id.ll_site);
        mRvHavePaid=mActivity.findViewById(R.id.rv_have_paid);
        mRvHavePaid2=mActivity.findViewById(R.id.rv_have_paid2);
        mRvUnpaid = mActivity.findViewById(R.id.rv_unpaid);
        ivStatus = mActivity.findViewById(R.id.iv_status);
        ivStatus2 = mActivity.findViewById(R.id.iv_status2);
        tvStatus = mActivity.findViewById(R.id.tv_status);
        tvStatus2 = mActivity.findViewById(R.id.tv_status2);
        evCargoInformation = mActivity.findViewById(R.id.ev_cargo_information);
        expandView = mActivity.findViewById(R.id.ev_order_info);
        mLlCostInformation = mActivity.findViewById(R.id.ll_cost_information);
        mTvUnpaid = mActivity.findViewById(R.id.tv_unpaid);
        mTvPaidExpenses2 = mActivity.findViewById(R.id.tv_paid_expenses2);
        mLlPersonnelInformation = mActivity.findViewById(R.id.ll_personnel_information);
        mIvHeadPortrait = mActivity.findViewById(R.id.iv_head_portrait);
        mTvTailNumber = mActivity.findViewById(R.id.tv_tail_number);
        mTvPhoneNumber = mActivity.findViewById(R.id.tv_phone_number);
        mIvLocation = mActivity.findViewById(R.id.iv_location);
        mIvSendMessage = mActivity.findViewById(R.id.iv_send_message);
        mIvCall = mActivity.findViewById(R.id.iv_call);
        mOrderInformation = mActivity.findViewById(R.id.order_information);
        mTvTime = mActivity.findViewById(R.id.tv_time);
        mTvDistance = mActivity.findViewById(R.id.tv_distance);
        mClLocation = mActivity.findViewById(R.id.cl_location);
        mTvPlaceDeparture = mActivity.findViewById(R.id.tv_place_departure);
        mView = mActivity.findViewById(R.id.view);
        mTvDestination = mActivity.findViewById(R.id.tv_destination);
        mTvDepartureAddress = mActivity.findViewById(R.id.tv_departure_address);
        mTvDeliveryAddress = mActivity.findViewById(R.id.tv_delivery_address);
        mTvDepartureCompany = mActivity.findViewById(R.id.tv_departure_company);
        mTvDeliveryCompany = mActivity.findViewById(R.id.tv_delivery_company);
        mTvDepartureInfo = mActivity.findViewById(R.id.tv_departure_info);
        mTvDeliveryInfo = mActivity.findViewById(R.id.tv_delivery_info);
        mTvOrderNumber = mActivity.findViewById(R.id.tv_order_number);
        mTvCopy = mActivity.findViewById(R.id.tv_copy);
        mTvCopy.setOnClickListener(this);
        mTvOrderTime = mActivity.findViewById(R.id.tv_order_time);
        mTvAppointmentTime = mActivity.findViewById(R.id.tv_appointment_time);
        mTvOrderType = mActivity.findViewById(R.id.tv_order_type);
        mTvIsInvoice = mActivity.findViewById(R.id.tv_is_invoice);
        mTvLogisticsType = mActivity.findViewById(R.id.tv_logistics_type);
        mTvRecoveryStrip = mActivity.findViewById(R.id.tv_recovery_strip);
        mTvRemake = mActivity.findViewById(R.id.tv_remake);
        mLlOrderInfo = mActivity.findViewById(R.id.ll_order_info);
        mCargoInformation = mActivity.findViewById(R.id.cargo_information);
        mRvPicture = mActivity.findViewById(R.id.rv_picture);
        mTvQuantity = mActivity.findViewById(R.id.tv_quantity);
        mTvWeight = mActivity.findViewById(R.id.tv_weight);
        mTvVolume = mActivity.findViewById(R.id.tv_volume);
        mTvDescriptionGoods = mActivity.findViewById(R.id.tv_description_goods);
        mTvPackagingType = mActivity.findViewById(R.id.tv_packaging_type);
        mTvDeliveryType = mActivity.findViewById(R.id.tv_delivery_type);
        mTvDistributionType = mActivity.findViewById(R.id.tv_distribution_type);
        mTvPickUpCargoByOneself = mActivity.findViewById(R.id.tv_pick_up_cargo_by_oneself);
        mTvIsomerism = mActivity.findViewById(R.id.tv_isomerism);
        mTvDeclaredValue = mActivity.findViewById(R.id.tv_declared_value);
        mLlGoodsInfo = mActivity.findViewById(R.id.ll_goods_info);
        mTvCostBreakdown = mActivity.findViewById(R.id.tv_cost_breakdown);
        mTvPaidExpenses = mActivity.findViewById(R.id.tv_paid_expenses);

        mTvOnlineCustomerService = mActivity.findViewById(R.id.tv_online_customer_service);
        mTvAgreement = mActivity.findViewById(R.id.tv_agreement);
        mTvAgreement.setOnClickListener(this);
        mSlideRail = mActivity.findViewById(R.id.slide_rail);
        mLockBtn = mActivity.findViewById(R.id.lock_btn);
        llAppointment = mActivity.findViewById(R.id.ll_appointment);
        mLlOrderInfo.setOnClickListener(this);
        mIvCall.setOnClickListener(this);
        mLlGoodsInfo.setOnClickListener(this);
        pictureShowAdapter = new PictureShowAdapter(R.layout.item_picture3);
        mRvPicture.setAdapter(pictureShowAdapter);
        mRvPicture.setLayoutManager(new GridLayoutManager(mActivity, 3));
        mActivity.findViewById(R.id.tv_cost_breakdown2).setOnClickListener(this);
        mActivity.findViewById(R.id.tv_cost_breakdown).setOnClickListener(this);

    }

    //打电话用
    private OrderGoodsBean orderGoodsBean;
    private SourceGoodsDetailsBean.DataDTO data;

    public void initData(SourceGoodsDetailsBean.DataDTO data) {
        this.data = data;
        mTvAppointmentTime.setText(DateUtils.stampToDate(data.getOrder_info().getYuyue_time()));
        List<FeeDetail> list = new ArrayList<>();
        List<FeeDetail> havePaidList = new ArrayList<>();
        BigDecimal bdHavePaid = new BigDecimal("0");//已支付总费用
        BigDecimal unPaid = new BigDecimal("0");//未支付总费用
        BigDecimal weChatPay = new BigDecimal("0");//微信支付
        BigDecimal offlineTransaction = new BigDecimal("0");//线下支付
        BigDecimal balancePay = new BigDecimal("0");//余额支付
        BigDecimal payAlipay = new BigDecimal("0");//支付宝支付
        for (FeeDetail datum : data.getFee_detail()) {
            if (datum.getStatus() == 2) {
                //已支付
                bdHavePaid = bdHavePaid.add(new BigDecimal(datum.getMoney()));
            }
            if (datum.getStatus() == 0) {
                unPaid = unPaid.add(new BigDecimal(datum.getMoney()));
                //未支付
                list.add(datum);
            }
            if (datum.getPay_type() == 4) {
                weChatPay = weChatPay.add(new BigDecimal(datum.getMoney()));
            }
            if (datum.getPay_type() == 3) {
                payAlipay = payAlipay.add(new BigDecimal(datum.getMoney()));
            }
            if (datum.getPay_type() == 2) {
                balancePay = balancePay.add(new BigDecimal(datum.getMoney()));
            }
            if (datum.getPay_type() == 1) {
                offlineTransaction = offlineTransaction.add(new BigDecimal(datum.getMoney()));
            }
        }

        if(!offlineTransaction.toString().equals("0")){
            havePaidList.add(new FeeDetail("线下支付",offlineTransaction.toString()));
        }
        if(!balancePay.toString().equals("0")){
            havePaidList.add(new FeeDetail("余额支付",balancePay.toString()));
        }
        if(!payAlipay.toString().equals("0")){
            havePaidList.add(new FeeDetail("支付宝支付",payAlipay.toString()));
        }
        if(!weChatPay.toString().equals("0")){
            havePaidList.add(new FeeDetail("微信支付",weChatPay.toString()));
        }
        HavePaidAdapter havePaidAdapter=new HavePaidAdapter(havePaidList);
        //有两个费用明细 老板说未支付的在上门 支付完在下面
        //总支付金额
        mTvPaidExpenses.setText(String.format("%s元", bdHavePaid));
        mTvPaidExpenses2.setText(String.format("%s元", bdHavePaid));
        //未支付总金额
        mTvUnpaid.setText(String.format("%s元", unPaid));

        if (bdHavePaid.toString().equals("0")) {
            mActivity.findViewById(R.id.ll_have_paid).setVisibility(View.GONE);
        }
        if (data.getOrder_info().getPay_status() == 0) {
            //有未支付的费用
            mLlCostInformation.setVisibility(View.VISIBLE);
            mCargoInformation.setVisibility(View.GONE);
            mRvUnpaid.setLayoutManager(new LinearLayoutManager(mActivity));
            mRvUnpaid.setAdapter(new UnpaidAdapter(list, data.getOrder_info().getPay_method()));
            mRvHavePaid.setAdapter(havePaidAdapter);
            mRvHavePaid.setLayoutManager(new LinearLayoutManager(mActivity));
        } else if (data.getOrder_info().getPay_status() == 2) {
            //已支付
            mLlCostInformation.setVisibility(View.GONE);
            mCargoInformation.setVisibility(View.VISIBLE);
            mRvHavePaid2.setAdapter(havePaidAdapter);
            mRvHavePaid2.setLayoutManager(new LinearLayoutManager(mActivity));
        }

        if (MyUtils.isEmpty(data.getFee_detail())) {
            mLlCostInformation.setVisibility(View.GONE);
            mCargoInformation.setVisibility(View.GONE);
        }
        animation = new RotateAnimation(0, 180, ivStatus.getWidth() / 2, ivStatus.getHeight() / 2);
        animation.setDuration(500);
        animation.setFillAfter(true);//设置为true，动画转化结束后被应用

        animation2 = new RotateAnimation(180, 0, ivStatus.getWidth() / 2, ivStatus.getHeight() / 2);
        animation2.setDuration(500);
        animation2.setFillAfter(true);//设置为true，动画转化结束后被应用
        SourceGoodsDetailsBean.DataDTO.OrderInfoDTO orderInfo = data.getOrder_info();
        mIvLocation.setVisibility(View.GONE);
        mTvTailNumber.setText(data.getCargo_info().getNickname());
        mTvPhoneNumber.setText(MyUtils.phoneHide(data.getCargo_info().getMobile()));
        RequestOptions options = new RequestOptions()
                .placeholder(R.mipmap.ic_cow)//图片加载出来前，显示的图片
                .fallback(R.mipmap.ic_cow) //url为空的时候,显示的图片
                .error(R.mipmap.ic_cow);//图片加载失败后，显示的图片
        Glide.with(mActivity).load(data.getCargo_info().getHeaderpic()).apply(options).into(mIvHeadPortrait);

        if (TextUtils.isEmpty(orderInfo.getPickup_province())) {
            mTvDepartureAddress.setText(String.format("%s-%s", orderInfo.getPickup_city(), orderInfo.getPickup_address()));
        } else {
            mTvDepartureAddress.setText(String.format("%s-%s-%s", orderInfo.getPickup_province(), orderInfo.getPickup_city(), orderInfo.getPickup_address()));
        }

        if (TextUtils.isEmpty(orderInfo.getReceive_province())) {
            mTvDeliveryAddress.setText(String.format("%s-%s", orderInfo.getReceive_city(), orderInfo.getReceive_address()));
        } else {
            mTvDeliveryAddress.setText(String.format("%s-%s-%s", orderInfo.getReceive_city(), orderInfo.getReceive_city(), orderInfo.getReceive_address()));
        }
        if (orderInfo.getStatus() < 6) {
            mTvTime.setText(orderInfo.getYuyue_time() == 0 ? "即时" : DateUtils.descriptiveData(orderInfo.getYuyue_time()));
            mTvDistance.setText(String.format("距您%s公里", GetDistanceUtils.getDistance(Double.parseDouble(data.getOrder_info().getPickup_longitude())
                    , Double.parseDouble(data.getOrder_info().getPickup_latitude()), Location.companyLon, Location.companyLat)));
        }else {
            mTvTime.setText("订单详情");
        }
        //出发公司
        MyUtils.setText(mTvDepartureCompany, orderInfo.getPickup_remark());
        //到达公司
        MyUtils.setText(mTvDeliveryCompany, orderInfo.getReceive_remark());

        mTvDepartureInfo.setText(String.format("%s %s", orderInfo.getPickup_truename(), MyUtils.phoneHide(orderInfo.getPickup_mobile())));
        mTvDeliveryInfo.setText(String.format("%s %s", orderInfo.getReceive_truename(), MyUtils.phoneHide(orderInfo.getReceive_mobile())));
        mTvOrderNumber.setText(orderInfo.getDeliver_sn());
        mTvOrderTime.setText(DateUtils.stampToDate(orderInfo.getCreate_time()));
        mTvOrderType.setText(MyUtils.getOrderType(orderInfo.getOrder_type()));
        mTvIsInvoice.setText(MyUtils.isInvoice(orderInfo.getIs_invoice()));
        mTvLogisticsType.setText(MyUtils.getHaulageTime(orderInfo.getDeliver_type(), orderInfo.getTransport_day_max(), orderInfo.getTransport_day_min()));
        mTvRecoveryStrip.setText(MyUtils.getReceiptType(orderInfo.getReceipt_type()));
        MyUtils.setText(mTvRemake, orderInfo.getRemark());
        mTvQuantity.setText(String.valueOf(orderInfo.getGoods_number()));
        mTvWeight.setText(orderInfo.getGoods_weight());
        mTvVolume.setText(orderInfo.getGoods_volume());
        mTvDescriptionGoods.setText(orderInfo.getGoods_name());
        mTvPackagingType.setText(orderInfo.getPack_name());
        mTvDeliveryType.setText(MyUtils.getDeliveryType(orderInfo.getJiaohuo_type()));
        mTvDistributionType.setText(MyUtils.getDistributionType(orderInfo.getPeisong_type()));
        mTvIsomerism.setText(orderInfo.getPack_is_special().equals("1") ? "是" : "否");//是否有异性件
        if (orderInfo.getPack_is_special().equals("1")) {
            mTvHeteroideusVolume.setVisibility(View.VISIBLE);
            mTvHeteroideusVolume.setText(String.format("长x宽x高：%sx%sx%sm", orderInfo.getPack_long(), orderInfo.getPack_width(), orderInfo.getPack_height()));
        }
        StringBuilder stringBuilder = new StringBuilder();
        if (!TextUtils.isEmpty(orderInfo.getOutlets_name())) {
            stringBuilder.append(String.format("公司名称：%s\n", orderInfo.getOutlets_name()));
        }
        if (!TextUtils.isEmpty(orderInfo.getOutlets_address())) {
            stringBuilder.append(String.format("地址：%s\n", orderInfo.getOutlets_address()));
        }
        if (!TextUtils.isEmpty(orderInfo.getOutlets_county())) {
            stringBuilder.append(String.format("负责人：%s\n", orderInfo.getOutlets_contact()));
        }
        if (!TextUtils.isEmpty(orderInfo.getOutlets_moble())) {
            stringBuilder.append(String.format("电话：%s\n", orderInfo.getOutlets_moble()));
        }
        if (TextUtils.isEmpty(stringBuilder.toString())) {
            llSite.setVisibility(View.GONE);
        } else {
            mTvPickUpCargoByOneself.setText(stringBuilder.toString());//自提网点
        }
        mTvDeclaredValue.setText(orderInfo.getGoods_value_price());
        if (data.getOrder_info().

                getIs_yuyue() > 0) {
            llAppointment.setVisibility(View.VISIBLE);
        } else {
            llAppointment.setVisibility(View.GONE);
        }

        if (!MyUtils.isEmpty(data.getImage_list().

                getImg_0())) {
            List<PictureShowBean> pictureShowBeanList = new ArrayList<>();
            List<Object> urls = new ArrayList<>();
            for (SourceGoodsDetailsBean.DataDTO.ImageListDTO.ImgDTO imgDTO : data.getImage_list().getImg_0()) {
                pictureShowBeanList.add(new PictureShowBean(imgDTO.getImg_path()));
                urls.add(MyUtils.watermark(imgDTO.getImg_path()));
            }
            pictureShowAdapter.setNewData(pictureShowBeanList);
            pictureShowAdapter.setOnItemClickListener(new BaseQuickAdapter.OnItemClickListener() {
                @Override
                public void onItemClick(BaseQuickAdapter adapter, View view, int position) {
                    new XPopup.Builder(mActivity)
                            .asImageViewer(view.findViewById(R.id.iv_picture), position, urls, null, new SmartGlideImageLoader())
                            .isShowSaveButton(false)
                            .show();
                }
            });
        }

        orderGoodsBean = new OrderGoodsBean();
        orderGoodsBean.setCargo_mobile(data.getCargo_info().

                getMobile());
        orderGoodsBean.setPickup_mobile(orderInfo.getPickup_mobile());
        orderGoodsBean.setPickup_address(orderInfo.getPickup_address());
        orderGoodsBean.setReceive_mobile(orderInfo.getReceive_mobile());
        orderGoodsBean.setReceive_address(orderInfo.getReceive_address());

    }

    @SuppressLint("NonConstantResourceId")
    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.ll_order_info:
                shrink();
                break;
            case R.id.ll_goods_info:
                shrink2();
                break;
            case R.id.iv_call:
                bottomSelect();
                break;
            case R.id.tv_copy:
                //创建一个新的文本clip对象
                mClipData = ClipData.newPlainText("Simple text", mActivity.getIntent().getStringExtra("deliver_sn"));
                //把clip对象放在剪贴板中
                mClipboardManager.setPrimaryClip(mClipData);
                ToastUtil.show("复制成功");
                break;
            case R.id.tv_cost_breakdown:
            case R.id.tv_cost_breakdown2:
                mActivity.startActivity(new Intent(mActivity, ObviousCostActivity.class)
                        .putParcelableArrayListExtra("FeeDetail", data.getFee_detail())
                        .putExtra("orderType", data.getOrder_info().getOrder_type()));
                break;
            case R.id.tv_agreement:
                mActivity.startActivity(new Intent(mActivity, WebViewActivity.class)
                        .putExtra("url", Config.getTransportationUrl())
                        .putExtra("title", "运输协议"));
                break;


        }
    }


    private BasePopupView basePopupView;
    private BottomSelectPhoneDialog selectPhoneDialog;

    private void bottomSelect() {
        if (basePopupView == null) {
            selectPhoneDialog = new BottomSelectPhoneDialog(mActivity, orderGoodsBean);
            basePopupView = new XPopup.Builder(mActivity)
                    .asCustom(selectPhoneDialog)
                    .show();
        } else {
            basePopupView.show();
        }
    }

    private void shrink2() {
        evCargoInformation.expand();
        if (evCargoInformation.isShow) {
            tvStatus2.setText("收起");
            ivStatus2.startAnimation(animation2);//开始动画
        } else {
            tvStatus2.setText("展开");
            ivStatus2.startAnimation(animation);//开始动画
        }
    }

    private void shrink() {
        //创建旋转动画
        expandView.expand();
        if (expandView.isShow) {
            tvStatus.setText("收起");
            ivStatus.startAnimation(animation2);//开始动画
        } else {
            ivStatus.startAnimation(animation);//开始动画
            tvStatus.setText("展开");
        }
    }
}
